package com.icezzz.java_version;

import cn.hutool.core.io.FileUtil;

public class App {
	public static void main(String[] args) {
		String file = "C:/Users/Administrator/Desktop/App.class";
		byte[] readBytes = FileUtil.readBytes(file);
		if (readBytes[0] == -54 && readBytes[1] == -2 && readBytes[2] == -70 && readBytes[3] == -66) {
			if (readBytes[4] == 0 && readBytes[5] == 0 && readBytes[6] == 0) {
				int version = readBytes[7] - 44;
				System.out.println("version=" + version);
			}
		}
	}
}
